// 取出来调用后端接口的地址
import { API_CONFIG } from "../config/index.js";
import request from "../api/index.js";
// 在很多位置，都可能用到同一个接口, data: {}
export const getServiceListHandler = (data) => {
    return request(API_CONFIG.getServiceListApi, data, "get", "2000")
}

export const deleteServiceHandler = (clusterId, namespace, name) => {
    return request(API_CONFIG.deleteServiceApi, {clusterId, namespace, name}, "post", "2000")
}
// 
export const createServiceHandler = (data) => {
    return request(API_CONFIG.createServiceApi, data, "post", "2000")
}

export const updateServiceHandler = (data) => {
    return request(API_CONFIG.updateServiceApi, data, "post", "2000")
}

export const getServiceDetailHandler = (data) => {
    return request(API_CONFIG.getServiceApi, data, "get", "2000")
}